'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  // 普通文件上传路由
  router.post('/upfile', controller.upload.uploadAvator);
  // OSS上传后端路由
  router.post('/upfile/oss', controller.upload.uploadOss);
  // 获取OSS上传文件列表路由
  router.get('/upfile/oss/list', controller.upload.uploadOssList);
  // 删除图片路由
  router.delete('/delete/img', controller.upload.deleteImage);
};
